-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gcc: fix missing atomic ops errors on risc-v #268067
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not excited about carrying a gcc patch simply in order to eliminate LDFLAGS
from a few packages.
It looks like this patch didn't make it into gcc 13.2, so if there is a workaround (which there is) we should be using the workaround instead until this patch shows up in a release. Generally we ship merged-but-unreleased patches only when there is no alternative available.
### RISC-V | ||
|
||
|
||
# https://gcc.gnu.org/git?p=gcc.git;a=commit;h=f797260adaf52bee0ec0e16190bbefbe1bfc3692 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What release is this commit part of? git tag --contains
doesn't report any.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
None yet as far as I can see
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turns out gcc 13 includes the patch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then why not just use
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that's perfect!
I thought that upgrade was still far off, good to know that's not the case!
I suspect that there are way more broken packages that we don't know about, since nobody builds the whole nixpkgs on risc-v. For now I just discovered cmake and llvm 17, so I can certainly apply the workaround to those too. Up to you. |
...and of course it's a mass rebuild because |
Fixes errors like: ld: [...]: undefined reference to `__atomic_exchange_1' * Backport patch from gcc 13 that uses libatomic for missing ops: https://gcc.gnu.org/git?p=gcc.git;a=commit;h=f797260adaf52bee0ec0e16190bbefbe1bfc3692 A few conflicts were resolved, so the patch is included as a file. * Remove workarounds from * aws-sdk-cpp * libjxl * numactl * mariadb * zstd
e6f8756
to
32db619
Compare
One of the many reasons to move towards |
Closing due to #268067 (comment). I'll apply the workaround to cmake in another pr so risc-v is not blocked for another 1-2 staging cycles, then once #145377 is in I'll remove all workarounds. |
Workarounds removed in #274827 |
Description of changes
Fixes errors like:
Fixes #258614 (comment)
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)